// TaskFunction.h

#pragma once
#ifndef TaskFunction_H
#define TaskFunction_H

#include <string>
#include <sstream>
#include <vector>
#include "Task.h"
#include "TaskFilter.h"
#include "TaskStorage.h"
#include "State.h"
#include "Display.h"

class TaskFunction {
private:
	std::vector<Task> _taskList;
	std::vector<Task> _displayList;
	std::vector<std::vector<Task>::iterator> _displayIndexList;
	Display _display;
	TaskFilter _filter;
	State _state;
	static std::string example;
	TaskStorage _userStorage;

public:
	TaskFunction();

	void addTask(std::string taskDesc, int startTime, int endTime, int dd, int mm, int yy);
	void deleteTask(int index);
	void editTask(int index, bool status, std::string taskDesc, int startTime, int endTime, int dd, int mm, int yy);
	void toggleComplete(int index);
	void getIncompleteTasks();
	void getCompleteTasks();
	void searchTasks(std::string searchTerm);
	void undo();
	void redo();
	std::vector<Task>::iterator indexToIterator(int index);

};

#endif